<?php


namespace app\home\controller;


use app\api\model\page\order\OrderListPage;
use app\home\model\page\order\UpdateOrderShipping;
use think\Controller;
use think\Request;


class Order extends Controller
{
    private $param;

    public function __construct()
    {
        parent::__construct();
        $this->param = Request::instance()->param();
    }

    public function orderListPage()
    {
        $obj = new OrderListPage();
        $ret = $obj->excute($this->param);
        //return JSON($ret);
        $this->assign('data', $ret['data']);
        return $this->fetch('home/pages/order/orderlist');
    }

    public function orderDetailPage()
    {
        $obj = new OrderListPage();
        $ret = $obj->excute($this->param);
        //return JSON($ret);
        //$this->assign('data',$ret['data']);
        return $this->fetch('home/pages/order/orderdetail');
    }

    public function orderShip()
    {
        $obj = new UpdateOrderShipping();
        $ret = $obj->excute($this->param);
        return JSON($ret);
    }

}